import { post } from '@/request/http'
import store from '@/store'

//运输仲裁 接口

// 列表数据接口
export const ComplaintList = (data) =>
  post(
    '/FTKJWLHYPT/transoprt/queryComplaint',
    {
      Data: {
        Parameters: {
          FTKJWLHYPT: {
          }
        },
        PageIndex: {
          FTKJWLHYPT: data.PageIndexs
        },
        PageSize: {
          FTKJWLHYPT: data.PageSizes
        }
      }
    }
  )
// 查询仲裁信息
export const queryArbitrateByWabCodeServer = ({
    arbitrationWabCode
  }) =>
  post(
    '/FTKJWLHYPT/arbitration/queryArbitrateByWabCode',
    {
      Data: {
        Parameters: {
          FTKJWLHYPT: {
            arbitrationWabCode,
            fltUuid: store.state.user.FLT_UUID_DX_H,
          }
        }
      }
    }
  )
//仲裁类型
export const arbitrationType=()=>{
  return post('/FTKJWLHYPT/base/getRefCodesByType',{
    Data:{
      Parameters:{
        FTKJWLHYPT:{
          rvDomain:'仲裁类型',
          rvTerId:store.state.user.FLT_UUID_DX_H
        }
      }
    }
  })
}
//仲裁订单
export const addArbitrationServer=({
     arbitrationId,
     arbitrationType,
     arbitrationWabCode,
     arbitrationContent,
     arbitrationMode = 'YS',
     contactDetails,
     created
   })=>{
  return post('/FTKJWLHYPT/arbitration/addArbitration',{
    Data:{
      Parameters:{
        FTKJWLHYPT:{
          arbitrationId: arbitrationId,
          fltUuid: store.state.user.FLT_UUID_DX_H,
          arbitrationType: arbitrationType,
          arbitrationContent: arbitrationContent,
          contactDetails: contactDetails,
          arbitrationMode:arbitrationMode,
          arbitrationWabCode: arbitrationWabCode,
          creator: store.state.user.USR_CODE_DX_H,
          created: created
        }
      }
    }
  })
}//仲裁审核
export const auditArbitration=({
     arbitrationId,
     auditOpinon,
  })=>{
  return post('/FTKJWLHYPT/arbitration/auditArbitration',{
    Data:{
      Parameters:{
        FTKJWLHYPT:{
          arbitrationId: arbitrationId,
          fltUuid: store.state.user.FLT_UUID_DX_H,
          auditOpinon: auditOpinon,
          editor: store.state.user.USR_CODE_DX_H
        }
      }
    }
  })
}
